Optimal. Leaf size=42 \[ \frac {2 a A \cos (c+d x)}{d}-\frac {a A \sin (c+d x) \cos (c+d x)}{2 d}+\frac {3 a A x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {21, 3788, 2638, 4045, 8} \[ \frac {2 a A \cos (c+d x)}{d}-\frac {a A \sin (c+d x) \cos (c+d x)}{2 d}+\frac {3 a A x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 21
Rule 2638
Rule 3788
Rule 4045
Rubi steps
\begin {align*} \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin ^2(c+d x) \, dx &=\frac {A \int (a-a \csc (c+d x))^2 \sin ^2(c+d x) \, dx}{a}\\ &=\frac {A \int \left (a^2+a^2 \csc ^2(c+d x)\right ) \sin ^2(c+d x) \, dx}{a}-(2 a A) \int \sin (c+d x) \, dx\\ &=\frac {2 a A \cos (c+d x)}{d}-\frac {a A \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} (3 a A) \int 1 \, dx\\ &=\frac {3 a A x}{2}+\frac {2 a A \cos (c+d x)}{d}-\frac {a A \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 35, normalized size = 0.83 \[ \frac {a A (6 (c+d x)-\sin (2 (c+d x))+8 \cos (c+d x))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.60, size = 38, normalized size = 0.90 \[ \frac {3 \, A a d x - A a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 4 \, A a \cos \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.35, size = 79, normalized size = 1.88 \[ \frac {3 \, {\left (d x + c\right )} A a + \frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, A a\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.44, size = 49, normalized size = 1.17 \[ \frac {a A \left (d x +c \right )+2 A \cos \left (d x +c \right ) a +a A \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 47, normalized size = 1.12 \[ \frac {{\left (2 \, d x + 2 \, c - \sin \left (2 \, d x + 2 \, c\right )\right )} A a + 4 \, {\left (d x + c\right )} A a + 8 \, A a \cos \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.39, size = 116, normalized size = 2.76 \[ \frac {3\,A\,a\,x}{2}-\frac {-A\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (A\,a\,\left (3\,c+3\,d\,x\right )-\frac {A\,a\,\left (6\,c+6\,d\,x+8\right )}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {A\,a\,\left (3\,c+3\,d\,x\right )}{2}-\frac {A\,a\,\left (3\,c+3\,d\,x+8\right )}{2}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 10.07, size = 105, normalized size = 2.50 \[ \begin {cases} \frac {A a x \cot ^{2}{\left (c + d x \right )}}{2 \csc ^{2}{\left (c + d x \right )}} + A a x + \frac {A a x}{2 \csc ^{2}{\left (c + d x \right )}} + \frac {2 A a \cot {\left (c + d x \right )}}{d \csc {\left (c + d x \right )}} - \frac {A a \cot {\left (c + d x \right )}}{2 d \csc ^{2}{\left (c + d x \right )}} & \text {for}\: d \neq 0 \\\frac {x \left (- A \csc {\relax (c )} + A\right ) \left (- a \csc {\relax (c )} + a\right )}{\csc ^{2}{\relax (c )}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________